//
// Created by 吴喆 on 2020/3/28.
//

#ifndef BREAKOUT_TEXTRENDERER_H
#define BREAKOUT_TEXTRENDERER_H

#include <glad/glad.h>
#include <glm/glm.hpp>
#include "Shader.h"
#include "Renderer.h"


class TextRenderer : public Renderer {
public:
    explicit TextRenderer(Shader *shader);
    void RenderText(std::wstring text, GLfloat x, GLfloat y, GLfloat scale, glm::vec3 color);

    void DrawSprite(Camera *camera, Texture2D *texture, glm::vec2 position, glm::vec2 size, float rotate, bool hFlip,
                    bool vFlip, bool useColor, glm::vec4 color) override;
    void updateQuad(float a[6][4]);
private:
    void initRenderData();
    GLuint VBO;
};


#endif //BREAKOUT_TEXTRENDERER_H
